home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2007 December / PCWKCD1207B.iso / Blogowanie poza sfera / Flock 0.9.1.3 stable / flock-0.9.1.3.en-US.win32.exe / flock / chrome / browser.jar / content / browser / bookmarks / bookmarkAccount.xml < prev    next >
Text File  |  2007-08-15  |  5KB  |  161 lines

  1. <!--
  2.    BEGIN FLOCK GPL
  3.    
  4.    Copyright Flock Inc. 2005-2007
  5.    http://flock.com
  6.    
  7.    This file may be used under the terms of of the
  8.    GNU General Public License Version 2 or later (the "GPL"),
  9.    http://www.gnu.org/licenses/gpl.html
  10.    
  11.    Software distributed under the License is distributed on an "AS IS" basis,
  12.    WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  13.    for the specific language governing rights and limitations under the
  14.    License.
  15.    
  16.    END FLOCK GPL
  17. -->
  18. <bindings id="bookmarks_bindings"
  19.       xmlns="http://www.mozilla.org/xbl"
  20.       xmlns:html="http://www.w3.org/1999/xhtml"
  21.       xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  22.       xmlns:xbl="http://www.mozilla.org/xbl">
  23.  
  24.   <binding id="bookmarks-account">
  25.     <content>
  26.           <xul:checkbox anonid="mCheckBox" xbl:inherits="id,checked"
  27.                oncommand="myToggleCheckBox(); updateToggleInfo();"/>
  28.           <xul:hbox>
  29.             <xul:vbox>
  30.               <xul:spacer flex="1" />
  31.               <xul:image  xbl:inherits="src=icon" width="16" height="16"/>
  32.               <xul:spacer flex="1" />
  33.             </xul:vbox>
  34.             <xul:label xbl:inherits="value"/>
  35.             <xul:seperator flex="1" />
  36.           </xul:hbox>
  37.           <xul:hbox flex="1" >
  38.             <xul:seperator flex="1" />
  39.             <xul:label anonid="Publish" align="left"
  40.                  xbl:inherits="value=publishStatus"
  41.                  style="font: bold 11px arial;"/>
  42.           </xul:hbox>
  43.           <xul:hbox flex="1">
  44.             <xul:seperator flex="1" />
  45.             <xul:checkbox anonid="mPrivate" xbl:inherits="checked=private" label="Private" />   
  46.           </xul:hbox>  
  47.     </content>
  48.     <implementation implements="nsIDOMXULCheckboxElement">
  49.       <constructor>
  50.         <![CDATA[
  51.           this.toggleOccurred = false;
  52.         ]]>
  53.       </constructor>
  54.       <property name="checked">
  55.         <getter>
  56.           <![CDATA[
  57.             var checkBox = document.getAnonymousElementByAttribute(this, 'anonid', 'mCheckBox');
  58.             return checkBox.checked;
  59.           ]]>
  60.         </getter>
  61.         <setter>
  62.           <![CDATA[
  63.             var checkBox = document.getAnonymousElementByAttribute(this, 'anonid', 'mCheckBox');
  64.             checkBox.checked = val;
  65.           ]]>
  66.         </setter>
  67.       </property>
  68.       <property name="private">
  69.         <getter>
  70.           <![CDATA[
  71.             var checkBox = document.getAnonymousElementByAttribute(this, 'anonid', 'mPrivate');
  72.             return checkBox.checked;
  73.           ]]>
  74.         </getter>
  75.         <setter>
  76.           <![CDATA[
  77.             var checkBox = document.getAnonymousElementByAttribute(this, 'anonid', 'mPrivate');
  78.             checkBox.checked = val;
  79.           ]]>
  80.         </setter>
  81.       </property>
  82.       <method name="getPrivate">
  83.         <body>
  84.           <![CDATA[
  85.             var checkBox = document.getAnonymousElementByAttribute(this, 'anonid', 'mPrivate');
  86.             return checkBox.checked;
  87.           ]]>
  88.         </body>
  89.       </method>
  90.       <method name="updateToggleInfo">
  91.         <body>
  92.           <![CDATA[
  93.             if (this.toggleOccurred == "true") {
  94.               this.toggleOccurred = "false";
  95.              } else {
  96.               this.toggleOccurred = "true";
  97.             }
  98.           ]]>
  99.         </body>
  100.       </method>
  101.       <method name="myToggleCheckBox">
  102.         <body>
  103.           <![CDATA[
  104.             var publish = document.getAnonymousElementByAttribute(this,
  105.                                                                   "anonid",
  106.                                                                   "Publish");
  107.             var privateCheckbox = document
  108.                                  .getAnonymousElementByAttribute(this,
  109.                                                                  "anonid",
  110.                                                                  "mPrivate");
  111.  
  112.             if (privateCheckbox.disabled) {
  113.               privateCheckbox.disabled= false;
  114.               var status = this.getAttribute("privateStatus");
  115.               privateCheckbox.checked = this._returnBool(status);
  116.             }
  117.  
  118.             if (this.getAttribute("publishDate") && this.checked) {
  119.               publish.value = "-REPUBLISH-";
  120.             } else if (!this.getAttribute("publishDate") && this.checked) {
  121.               publish.value ="-PUBLISH-";
  122.             } else {
  123.               privateCheckbox.checked = false;
  124.               privateCheckbox.disabled = true;
  125.               publish.value = this.getAttribute("publishDate");
  126.             }
  127.           ]]>
  128.         </body>
  129.       </method>
  130.       <method name="_returnBool">
  131.         <parameter name="aString"/>
  132.         <body>
  133.           <![CDATA[
  134.             if (aString == "true") {
  135.               return true;
  136.             } else {
  137.               return false;
  138.             }
  139.          ]]>
  140.         </body>
  141.       </method>
  142.       <property name="toggleOccurred">
  143.         <getter>
  144.           <![CDATA[
  145.             // to prevent confusion going to return a boolean
  146.             var toggleAttr = this.getAttribute("_toggleOccurred");
  147.             return this._returnBool(toggleAttr);
  148.           ]]>
  149.         </getter>
  150.         <setter>
  151.           <![CDATA[
  152.             this.setAttribute("_toggleOccurred", val);
  153.           ]]>
  154.         </setter>
  155.       </property>
  156.       <field name="_toggleOccurred"/>
  157.     </implementation>
  158.   </binding>
  159.  
  160. </bindings>
  161.